(function () {
  return {
    "type": "page",
    "initApi": "/b/permits/init",
    "title": "量表解读",
    "toolbar": [
    ],
    "body": {
      "type": "crud",
      "className": "break-all",
      "hideQuickSaveBtn": true,
      "api": "get:/b/oc/index?type=1",
      "quickSaveApi": "post:/b/oc/batch",
      "quickSaveItemApi": "post:/b/oc/item?id=$id",
      // "itemCheckableOn": "this.is_super !== 1 && this.leader_count === 0",
      "perPage": 10,
      "keepItemSelectionOnPageChange": true,
      "maxKeepItemSelectionLength": 20,
      "pageField": "page",
      "perPageField": "page_size",
      "labelTpl": "${name}",
      "syncLocation": false,
      "filter": {
        "title": "条件搜索",
        "submitText": "搜索",
        "controls": [
          {
            "label": "交易单号：",
            "type": "text",
            "size": "sm",
            "name": "number",
            "placeholder": "请输入"
          },
          {
            "label": "订单状态",
            "type": "select",
            "size": "sm",
            "name": "status",
            "searchable": true,
            "placeholder": "请选择",
            "source": "get:/b/oc/status",
          },
          {
            "label": "服务专家",
            "type": "select",
            "size": "sm",
            "name": "expert_id",
            "searchable": true,
            "clearable": true,
            "source": "get:/b/expert/options",
          },
          {
            "type": "datetime-range",
            "name": "consult_at",
            "label": "预约咨询时间："
          },
          {
            "type": "datetime-range",
            "name": "createtime",
            "label": "创建时间："
          }
        ],
        "actions": [
          {
            "type": "button",
            "actionType": "clear",
            "label": "重置"
          },
          {
            "type": "button",
            "actionType": "submit",
            "label": "搜索",
            "level": "primary",
          }
        ]
      },
      "bulkActions": [
        // {
        //   "label": "批量删除",
        //   "visibleOn": "isInArray(this.front_end, 'admin_list_delete')",
        //   "level": "danger",
        //   "actionType": "ajax",
        //   "api": "post:/b/admin/del/${ids|raw}",
        //   "confirmText": "确定要批量删除?"
        // }
      ],
      "filterTogglable": true,
      "headerToolbar": [
        "filter-toggler",
        "bulkActions",
        {
          "type": "columns-toggler",
          "align": "right"
        },
        {
          "type": "pagination",
          "align": "right"
        }
      ],
      "footerToolbar": [
        "statistics",
        "switch-per-page",
        "pagination"
      ],
      "columns": [
        {
          "name": "id",
          "label": "ID",
          "hidden": true,
          "sortable": true,
          "type": "text",
          "toggled": true
        },
        {
          "name": "number",
          "label": "交易单号",
          "sortable": false,
          "searchable": false,
          "type": "text",
          "toggled": true,
        },
        {
          "name": "user_name",
          "label": "用户名",
          "sortable": false,
          "searchable": false,
          "type": "text",
          "toggled": true,
        },
        {
          "name": "refund_at",
          "label": "发起退款时间",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "consult_at",
          "label": "预约咨询时间",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "status_map",
          "label": "订单状态",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "name",
          "label": "购买商品",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "purchase_time_map",
          "label": "购买时长(分钟)",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "consult_method_map",
          "label": "服务方式",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "expert_name",
          "label": "服务专家",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "total_amount",
          "label": "订单总价(元)",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "payment_type_map",
          "label": "支付方式",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "deduct_amount",
          "label": "元心币抵扣(元)",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
        {
          "name": "created_at",
          "label": "创建时间",
          "type": "text",
          "sortable": false,
          "toggled": true
        },
      ]
    }
  };
})();